
<style>
.article-bar,.article-pic{display:none;}
.article p{display:none;}
h3{margin:0px;}
hr{display:none}、
ul,li{list-style:none;}
li{background-image:url(../img/yw.jpg);background-size:40px 22px;background-position:0px 9px;background-repeat:no-repeat;text-indent: 20px;height:40px;line-height:40px;border:solid 1px #ededed;}
li a{color:red;text-decoration: none;}
</style>
<?php
//采集汽车之家demo
require 'QueryList.class.php';
header("Content-type: text/html; charset=utf-8");     
$pattern = array("title" => array("#auto-channel-lazyload-article li a h3", "text"),'href'=>array("#auto-channel-lazyload-article li a",'href'),'img'=>array('#auto-channel-lazyload-article li a .article-pic img','src'));
$url = "https://www.autohome.com.cn/all/";
$qy = new QueryList($url, $pattern, '', '', 'utf-8//TRANSLIT//IGNORE');
$rs = $qy->jsonArr;

$ab=("/cj/controller/ss_up.php?image=");
$im=("&url=");
$ul = "<ul>";
foreach($rs as $v){
   // $ul .= "<img src=".$v[img]." width='30px;'>";
    $ul .= "<li class='tit'><img src=".$v['img']." style='display:block;float:left;margin-left:60px;width:80px;height:40px;'>

    <a href=".$ab.$v['img'].$im.$v['href'].">".$v['title']."</a>


    </li>";
  //  $ul .= "<li class='tit' style='color:red'><a >".$v['href']."</a></li>";
   // $ul .= "<li class='tit' style='color:red'><a >".$v['img']."</a></li>";
}
$ul .= "</ul>";
echo $ul;



    ?>
<!--
<form  action="ss_up.php" method="post"  style="margin-bottom:0px;background:#d5d5d5;position:fixed;bottom:0px;left:0px;width:100%">
<input type="text" name="image" value="" id="img" style="display:none;">
<input style="background:#f2f2f2;margin-left:9%;font-size:30px;width:70%;height:40px;border:solid 2px red;" type="text" name="url" id="url" value="请把鼠标放在你想发布的链接上">
<input type="submit" value="审稿" style="width:100px;height:44px;font-size:30px;">
</form>

-->
<script src="../js/jquery.min.js"></script>
<script>
$(document).ready(function(){
    $("a").hover(function(){
    	//alert($(this).attr('href'));  
    	var  x=($(this).attr('href'));  
    	//alert(x);   //提示x变量等于所点击的a标签值
    	$("#url").val(x); //查找id=url的部分并且把value的值修改为所点击的链接

    });

});

$(document).ready(function(){
    $("img").hover(function(){
        //alert($(this).attr('href'));  
        var  x=($(this).attr('src'));  
        //alert(x);   //提示x变量等于所点击的a标签值
        $("#img").val(x); //查找id=url的部分并且把value的值修改为所点击的链接

    });

});
</script>


<!--
<script type="text/javascript">
//获取当前点击的对象
    $('a').click(
        function() {
           // console.log("当前URL为:", $(this).attr('href'));
            alert("当前URL为:", $(this).attr('href'));
        }
    );
</script><script>alert('发布成功！');</script>
-->

